<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Status
 *
 * @ORM\Table(name="ue_status", uniqueConstraints={@ORM\UniqueConstraint(name="code", columns={"code"})}, indexes={@ORM\Index(name="default_group_id_idx", columns={"default_group_id"})})
 * @ORM\Entity
 */
class Status
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="code", type="string", length=30, nullable=false)
     */
    private $code;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=30, nullable=false)
     */
    private $name;

    /**
     * @var \Organize
     *
     * @ORM\ManyToOne(targetEntity="Organize")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="default_group_id", referencedColumnName="id")
     * })
     */
    private $defaultGroup;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set code
     *
     * @param string $code
     * @return Status
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code
     *
     * @return string 
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Status
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set defaultGroup
     *
     * @param \Ue\ErpBundle\Entity\Organize $defaultGroup
     * @return Status
     */
    public function setDefaultGroup(\Ue\ErpBundle\Entity\Organize $defaultGroup = null)
    {
        $this->defaultGroup = $defaultGroup;

        return $this;
    }

    /**
     * Get defaultGroup
     *
     * @return \Ue\ErpBundle\Entity\Organize 
     */
    public function getDefaultGroup()
    {
        return $this->defaultGroup;
    }
}
